n, m = map(int, input().split(" "))
a = max(n, m)
b = min(n, m)

que = a - b
num = a * b
squnum = 0
for i in range(b):
    squnum += (a-i)*(b-i)
rectnum = num * (a + 1) * (b + 1) / 4

print('%d %d' % (squnum, rectnum-squnum))
